Today we begin to switch things up a bit. Since our last two code submissions were written in Java, we figured it was about time to see something new and check out how the Look-and-Say sequence could be handled Ruby style.
Caitlin was possibly the only coder who used Ruby at the event, and her submission shows the interesting differences in regular expressions between Ruby and Java (compared with Chris’ submission). The author of this post is not a Ruby developer, but Caitlin’s code appears to use something called subexpressions in Ruby.
We can only speculate as to whether or not fellow Rubyist Jason would have produced code as good as Caitlin’s. Perhaps we will be able to find out at the next code kata event?
Take a peek at Caitlin’s code…